/**
 * Generate time : 2011-07-01 9:48:51
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cm.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCMTurnoverRecord
 * 
 */
public class ZMCMTurnoverRecord extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private String fdSourceKeyId = " "; /* 原单ID */
	private String fdExportDate = " "; /* 发料日期 */
	private String fdImportDate = " "; /* 回收日期 */
	private String fdDepartment = " "; /* 使用单位 */
	private String fdTrunoverMaterialId = " "; /* 周转物资ID */
	private String fdMaterialId = " "; /* 物资ID */
	private String fdMaterialCode = " "; /* 物资编码 */
	private String fdMaterialName = " "; /* 物资名称 */
	private String fdSpecModel = " "; /* 规格型号 */
	private String fdNumber = " "; /* 图号 */
	private String fdQuality = " "; /* 材质 */
	private String fdMetric = " "; /* 计量单位 */
	private Double fdActualNumber = new Double(0); /* 实发数量 */
	private Double fdImportNumber = new Double(0); /* 回收数量 */
	private Double fdDepreciationRate = new Double(0); /* 折旧率 */
	private String fdTrunoverStatus = " "; /* 回收状态 */
	private String fdRestorePlace = " "; /* 存放地点 */
	private String fdRemark = " "; /* 备注 */
	private String fdBusinessType = " "; /* 业务类型 */
	private Double fdChangedNum = new Double(0); /* 已交换数量 */
	private String fdStatus = " "; /* 状态 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdSourceKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("原单ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdExportDate");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("发料日期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdImportDate");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("回收日期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepartment");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("使用单位");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdTrunoverMaterialId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("周转物资ID");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdMaterialId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("物资ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaterialCode");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("物资编码");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaterialName");
		eiColumn.setFieldLength(80);
		eiColumn.setDescName("物资名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSpecModel");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("规格型号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdNumber");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("图号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdQuality");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("材质");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMetric");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("计量单位");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdActualNumber");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("实发数量");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdImportNumber");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("回收数量");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepreciationRate");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("折旧率");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdTrunoverStatus");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("回收状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRestorePlace");
		eiColumn.setFieldLength(500);
		eiColumn.setDescName("存放地点");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemark");
		eiColumn.setFieldLength(500);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdBusinessType");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("业务类型");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdChangedNum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("已交换数量");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdStatus");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("状态");
		eiMetadata.addMeta(eiColumn);
	}

	/**
	 * the constructor
	 */
	public ZMCMTurnoverRecord() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}
	
	/**
	 * get the fdSourceKeyId - 原单ID
	 * 
	 * @return the fdSourceKeyId
	 */
	public String getFdSourceKeyId() {
		return this.fdSourceKeyId;
	}

	/**
	 * set the fdSourceKeyId - 原单ID
	 */
	public void setFdSourceKeyId(String fdSourceKeyId) {
		this.fdSourceKeyId = fdSourceKeyId;
	}

	/**
	 * get the fdExportDate - 发料日期
	 * 
	 * @return the fdExportDate
	 */
	public String getFdExportDate() {
		return this.fdExportDate;
	}

	/**
	 * set the fdExportDate - 发料日期
	 */
	public void setFdExportDate(String fdExportDate) {
		this.fdExportDate = fdExportDate;
	}

	/**
	 * get the fdImportDate - 回收日期
	 * 
	 * @return the fdImportDate
	 */
	public String getFdImportDate() {
		return this.fdImportDate;
	}

	/**
	 * set the fdImportDate - 回收日期
	 */
	public void setFdImportDate(String fdImportDate) {
		this.fdImportDate = fdImportDate;
	}

	/**
	 * get the fdDepartment - 使用单位
	 * 
	 * @return the fdDepartment
	 */
	public String getFdDepartment() {
		return this.fdDepartment;
	}

	/**
	 * set the fdDepartment - 使用单位
	 */
	public void setFdDepartment(String fdDepartment) {
		this.fdDepartment = fdDepartment;
	}

	/**
	 * get the fdMaterialId - 物资ID
	 * 
	 * @return the fdMaterialId
	 */
	public String getFdMaterialId() {
		return this.fdMaterialId;
	}

	/**
	 * set the fdMaterialId - 物资ID
	 */
	public void setFdMaterialId(String fdMaterialId) {
		this.fdMaterialId = fdMaterialId;
	}
	
	/**
	 * get the fdTrunoverMaterialId - 周转物资ID
	 * 
	 * @return the fdTrunoverMaterialId
	 */
	public String getFdTrunoverMaterialId() {
		return this.fdTrunoverMaterialId;
	}

	/**
	 * set the fdTrunoverMaterialId - 周转物资ID
	 */
	public void setFdTrunoverMaterialId(String fdTrunoverMaterialId) {
		this.fdTrunoverMaterialId = fdTrunoverMaterialId;
	}

	/**
	 * get the fdMaterialCode - 物资编码
	 * 
	 * @return the fdMaterialCode
	 */
	public String getFdMaterialCode() {
		return this.fdMaterialCode;
	}

	/**
	 * set the fdMaterialCode - 物资编码
	 */
	public void setFdMaterialCode(String fdMaterialCode) {
		this.fdMaterialCode = fdMaterialCode;
	}

	/**
	 * get the fdMaterialName - 物资名称
	 * 
	 * @return the fdMaterialName
	 */
	public String getFdMaterialName() {
		return this.fdMaterialName;
	}

	/**
	 * set the fdMaterialName - 物资名称
	 */
	public void setFdMaterialName(String fdMaterialName) {
		this.fdMaterialName = fdMaterialName;
	}

	/**
	 * get the fdSpecModel - 规格型号
	 * 
	 * @return the fdSpecModel
	 */
	public String getFdSpecModel() {
		return this.fdSpecModel;
	}

	/**
	 * set the fdSpecModel - 规格型号
	 */
	public void setFdSpecModel(String fdSpecModel) {
		this.fdSpecModel = fdSpecModel;
	}

	/**
	 * get the fdNumber - 图号
	 * 
	 * @return the fdNumber
	 */
	public String getFdNumber() {
		return this.fdNumber;
	}

	/**
	 * set the fdNumber - 图号
	 */
	public void setFdNumber(String fdNumber) {
		this.fdNumber = fdNumber;
	}

	/**
	 * get the fdQuality - 材质
	 * 
	 * @return the fdQuality
	 */
	public String getFdQuality() {
		return this.fdQuality;
	}

	/**
	 * set the fdQuality - 材质
	 */
	public void setFdQuality(String fdQuality) {
		this.fdQuality = fdQuality;
	}

	/**
	 * get the fdMetric - 计量单位
	 * 
	 * @return the fdMetric
	 */
	public String getFdMetric() {
		return this.fdMetric;
	}

	/**
	 * set the fdMetric - 计量单位
	 */
	public void setFdMetric(String fdMetric) {
		this.fdMetric = fdMetric;
	}

	/**
	 * get the fdActualNumber - 实发数量
	 * 
	 * @return the fdActualNumber
	 */
	public Double getFdActualNumber() {
		return this.fdActualNumber;
	}

	/**
	 * set the fdActualNumber - 实发数量
	 */
	public void setFdActualNumber(Double fdActualNumber) {
		this.fdActualNumber = fdActualNumber;
	}

	/**
	 * get the fdImportNumber - 回收数量
	 * 
	 * @return the fdImportNumber
	 */
	public Double getFdImportNumber() {
		return this.fdImportNumber;
	}

	/**
	 * set the fdImportNumber - 回收数量
	 */
	public void setFdImportNumber(Double fdImportNumber) {
		this.fdImportNumber = fdImportNumber;
	}

	/**
	 * get the fdDepreciationRate - 折旧率
	 * 
	 * @return the fdDepreciationRate
	 */
	public Double getFdDepreciationRate() {
		return this.fdDepreciationRate;
	}

	/**
	 * set the fdDepreciationRate - 折旧率
	 */
	public void setFdDepreciationRate(Double fdDepreciationRate) {
		this.fdDepreciationRate = fdDepreciationRate;
	}

	/**
	 * get the fdTrunoverStatus - 回收状态
	 * 
	 * @return the fdTrunoverStatus
	 */
	public String getFdTrunoverStatus() {
		return this.fdTrunoverStatus;
	}

	/**
	 * set the fdTrunoverStatus - 回收状态
	 */
	public void setFdTrunoverStatus(String fdTrunoverStatus) {
		this.fdTrunoverStatus = fdTrunoverStatus;
	}

	/**
	 * get the fdRestorePlace - 存放地点
	 * 
	 * @return the fdRestorePlace
	 */
	public String getFdRestorePlace() {
		return this.fdRestorePlace;
	}

	/**
	 * set the fdRestorePlace - 存放地点
	 */
	public void setFdRestorePlace(String fdRestorePlace) {
		this.fdRestorePlace = fdRestorePlace;
	}

	/**
	 * get the fdRemark - 备注
	 * 
	 * @return the fdRemark
	 */
	public String getFdRemark() {
		return this.fdRemark;
	}

	/**
	 * set the fdRemark - 备注
	 */
	public void setFdRemark(String fdRemark) {
		this.fdRemark = fdRemark;
	}

	/**
	 * get the fdBusinessType - 业务类型
	 * 
	 * @return the fdBusinessType
	 */
	public String getFdBusinessType() {
		return this.fdBusinessType;
	}

	/**
	 * set the fdBusinessType - 业务类型
	 */
	public void setFdBusinessType(String fdBusinessType) {
		this.fdBusinessType = fdBusinessType;
	}
	
	/**
	 * get the fdChangedNum - 已交换数量
	 * 
	 * @return the fdChangedNum
	 */
	public Double getFdChangedNum() {
		return this.fdChangedNum;
	}

	/**
	 * set the fdChangedNum - 已交换数量
	 */
	public void setFdChangedNum(Double fdChangedNum) {
		this.fdChangedNum = fdChangedNum;
	}
	
	/**
	 * get the fdStatus - 状态
	 * 
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 回收状态
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdSourceKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSourceKeyId")), fdSourceKeyId));
		setFdExportDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdExportDate")), fdExportDate));
		setFdImportDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdImportDate")), fdImportDate));
		setFdDepartment(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartment")), fdDepartment));
		setFdTrunoverMaterialId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTrunoverMaterialId")), fdTrunoverMaterialId));
		setFdMaterialId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaterialId")), fdMaterialId));
		setFdMaterialCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaterialCode")), fdMaterialCode));
		setFdMaterialName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaterialName")), fdMaterialName));
		setFdSpecModel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSpecModel")), fdSpecModel));
		setFdNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdNumber")), fdNumber));
		setFdQuality(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdQuality")), fdQuality));
		setFdMetric(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMetric")), fdMetric));
		setFdActualNumber(NumberUtils.toDouble(StringUtils.toString(map.get("fdActualNumber")), fdActualNumber));
		setFdImportNumber(NumberUtils.toDouble(StringUtils.toString(map.get("fdImportNumber")), fdImportNumber));
		setFdDepreciationRate(NumberUtils.toDouble(StringUtils.toString(map.get("fdDepreciationRate")), fdDepreciationRate));
		setFdTrunoverStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTrunoverStatus")), fdTrunoverStatus));
		setFdRestorePlace(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRestorePlace")), fdRestorePlace));
		setFdRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemark")), fdRemark));
		setFdBusinessType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdBusinessType")), fdBusinessType));
		setFdChangedNum(NumberUtils.toDouble(StringUtils.toString(map.get("fdChangedNum")), fdChangedNum));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdSourceKeyId", StringUtils.toString(fdSourceKeyId, eiMetadata.getMeta("fdSourceKeyId")));
		map.put("fdExportDate", StringUtils.toString(fdExportDate, eiMetadata.getMeta("fdExportDate")));
		map.put("fdImportDate", StringUtils.toString(fdImportDate, eiMetadata.getMeta("fdImportDate")));
		map.put("fdDepartment", StringUtils.toString(fdDepartment, eiMetadata.getMeta("fdDepartment")));
		map.put("fdTrunoverMaterialId", StringUtils.toString(fdTrunoverMaterialId, eiMetadata.getMeta("fdTrunoverMaterialId")));
		map.put("fdMaterialId", StringUtils.toString(fdMaterialId, eiMetadata.getMeta("fdMaterialId")));
		map.put("fdMaterialCode", StringUtils.toString(fdMaterialCode, eiMetadata.getMeta("fdMaterialCode")));
		map.put("fdMaterialName", StringUtils.toString(fdMaterialName, eiMetadata.getMeta("fdMaterialName")));
		map.put("fdSpecModel", StringUtils.toString(fdSpecModel, eiMetadata.getMeta("fdSpecModel")));
		map.put("fdNumber", StringUtils.toString(fdNumber, eiMetadata.getMeta("fdNumber")));
		map.put("fdQuality", StringUtils.toString(fdQuality, eiMetadata.getMeta("fdQuality")));
		map.put("fdMetric", StringUtils.toString(fdMetric, eiMetadata.getMeta("fdMetric")));
		map.put("fdActualNumber", StringUtils.toString(fdActualNumber, eiMetadata.getMeta("fdActualNumber")));
		map.put("fdImportNumber", StringUtils.toString(fdImportNumber, eiMetadata.getMeta("fdImportNumber")));
		map.put("fdDepreciationRate", StringUtils.toString(fdDepreciationRate, eiMetadata.getMeta("fdDepreciationRate")));
		map.put("fdTrunoverStatus", StringUtils.toString(fdTrunoverStatus, eiMetadata.getMeta("fdTrunoverStatus")));
		map.put("fdRestorePlace", StringUtils.toString(fdRestorePlace, eiMetadata.getMeta("fdRestorePlace")));
		map.put("fdRemark", StringUtils.toString(fdRemark, eiMetadata.getMeta("fdRemark")));
		map.put("fdBusinessType", StringUtils.toString(fdBusinessType, eiMetadata.getMeta("fdBusinessType")));
		map.put("fdChangedNum", StringUtils.toString(fdChangedNum, eiMetadata.getMeta("fdChangedNum")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));

		return map;

	}
}